using CodeSaude.Domain.Entities;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace CodeSaude.Infrastructure.Data.EntityConfig
{
    public class formulario_controleMap : EntityTypeConfiguration<formulario_controle>
    {
        public formulario_controleMap()
        {
            // Primary Key
            this.HasKey(t => t.id_controle);

            // Properties
            this.Property(t => t.descricao_controle)
                .IsRequired()
                .HasMaxLength(60);

            // Table & Column Mappings
            this.ToTable("formulario_controle");
            this.Property(t => t.id_controle).HasColumnName("id_controle");
            this.Property(t => t.descricao_controle).HasColumnName("descricao_controle");
        }
    }
}
